#ifndef __LADDER_BLOCK_H__
#define __LADDER_BLOCK_H__

#include "Block.hpp"

using namespace PocketSurvival::Engine;

namespace PocketSurvival
{    
    // 垂直梯子基类
    class LadderBlock : public Block
    {
    public:
		LadderBlock();
        virtual BlockPlacementData getPlacementValue(ComponentMiner *componentMiner, int32_t value, const TerrainRaycastResult &raycastResult) override;
		
        static inline int32_t GetFace(int32_t data);
		static inline int32_t SetFace(int32_t data, int32_t face);
    };

	inline int32_t LadderBlock::GetFace(int32_t data)
	{
		return data & 3;
	}
	inline int32_t LadderBlock::SetFace(int32_t data, int32_t face)
	{
		return (data & -4) | (face & 3);
	}

} // namespace PocketSurvival


#endif
